*/
if ( (offsetof(struct pfn_info, u.inuse._domain) !=
(offsetof(struct pfn_info, count_info) + sizeof(u32))) ||
+ ((offsetof(struct pfn_info, count_info) & 7) != 0) ||
(sizeof(struct pfn_info) != 24) )
{
printk("Weird pfn_info layout (%ld,%ld,%d)\n",
* count_info and domain fields must be adjacent, as we perform atomic
* 64-bit operations on them.
*/
- if ( (offsetof(struct pfn_info, u.inuse._domain) !=
- (offsetof(struct pfn_info, count_info) + sizeof(u32))) )
+ if ( ((offsetof(struct pfn_info, u.inuse._domain) !=
+ (offsetof(struct pfn_info, count_info) + sizeof(u32)))) ||
+ ((offsetof(struct pfn_info, count_info) & 7) != 0) ||
+ (sizeof(struct pfn_info) != 40) )
{
printk("Weird pfn_info layout (%ld,%ld,%ld)\n",
offsetof(struct pfn_info, count_info),
/* Each frame can be threaded onto a doubly-linked list. */
struct list_head list;
- /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */
- u32 tlbflush_timestamp;
-
/* Reference count and various PGC_xxx flags and fields. */
u32 count_info;
u32 _domain; /* pickled format */
/* Type reference count and various PGT_xxx flags and fields. */
unsigned long type_info;
- } inuse;
+ } __attribute__ ((packed)) inuse;
/* Page is on a free list: ((count_info & PGC_count_mask) == 0). */
struct {
+ /* Order-size of the free chunk this page is the head of. */
+ u32 order;
/* Mask of possibly-tainted TLBs. */
cpumask_t cpumask;
- /* Order-size of the free chunk this page is the head of. */
- u8 order;
- } free;
+ } __attribute__ ((packed)) free;
} u;
+
+ /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */
+ u32 tlbflush_timestamp;
};
/* The following page types are MUTUALLY EXCLUSIVE. */